<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<%@ taglib uri="/WEB-INF/struts-nested.tld" prefix="nested" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ page contentType="text/html; charset=windows-1252" %><head>
<title>
editarEstatus
</title>
</head>

<html:html>
<link href="css/estilos.css" rel="stylesheet" type="text/css">
  <script language="Javascript" type="">
  function validar(){
    var retorno = true;
    var mensaje = "";
    if(document.getElementById("str_codEstatus").value.length == 0){
      mensaje += '- Falta el codigo de estatus \n';
      retorno = false;
    }
    if(document.getElementById("str_descEstatus").value.length == 0){
      mensaje += '- Falta la descripcion de estatus \n';
      retorno = false;
    }
    if(!retorno){
      alert(mensaje);
    }
  return retorno;
  }

  function limpiar(){
    document.getElementById("str_codEstatus").value='';
    document.getElementById("str_descEstatus").value='';
  }
  </script>
<body onLoad="self.focus();">
<html:form action="/estatus.do" method="GET" onsubmit="return validar();">
  <logic:present parameter="str_idEstatus">
    <html:hidden property="action" value="updateEstatus"/>
    <bean:define id="tipo" value="Editar Estatus"></bean:define>
  </logic:present>
  <logic:notPresent parameter="str_idEstatus">
    <html:hidden property="action" value="insertEstatus"/>
    <bean:define id="tipo" value="Insertar Estatus"></bean:define>
  </logic:notPresent>
  <html:hidden property="str_idEstatus"/>
  <table border="0" cellpadding="0" cellspacing="1" width="100%" class="tabla">
    <tr>
      <td colspan="2">
        <table width="100%" cellpadding="0" cellspacing="0" border="0" class="encabezadoTabla">
          <tr>
            <td height="25" width="40%" align="right" valign="middle" class="encabezadoTabla font_general">
              <img src="images/img_loginFlecha.gif" alt=" " width="17" height="23"/>&nbsp;
            </td>
            <td width="60%" class="encabezadoTabla font_general" align="left" valign="middle">
              &nbsp;<strong><bean:write name="tipo"/></strong>
            </td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td height="25" align="right" valign="middle" class="colorLabel font_general">Codigo Estatus:&nbsp;</td>
      <td height="25" valign="middle" class="colorCampo font_general">&nbsp;<html:text property="str_codEstatus" size="35" maxlength="35" styleClass="textfield"/></td>
    </tr>
    <tr>
      <td height="25" align="right" valign="middle" class="colorLabel font_general">Desc. Estatus:&nbsp;</td>
      <td height="25" valign="middle" class="colorCampo font_general">&nbsp;<html:text property="str_descEstatus" size="35" maxlength="35" styleClass="textfield"/></td>
    </tr>
	<tr>
      <td height="25" align="right" valign="middle" class="colorLabel font_general">Crear Sol:&nbsp;</td>
      <td height="25" valign="middle" class="colorCampo font_general">
        <html:radio property="str_estatusNva" value="1"></html:radio>Si
        <html:radio property="str_estatusNva" value="0"></html:radio>No
      </td>
    </tr>
    <tr>
      <td colspan="2" valign="middle" class="colorLabel font_general">
        <table width="100%" cellpadding="0" cellspacing="0" border="0">
          <tr>
            <td align="center" height="30" class="colorLabel font_general"><html:button value ="Limpiar" styleClass="boton" onclick="limpiar();" property=""/></td>
            <td align="center" height="30" class="colorLabel font_general"><html:submit property="submit" value="Guardar" styleClass="boton"/></td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
</html:form>
</body>
</html:html>
